package cn.com.demo.microservice.consumer.service.feign.Impl;

import cn.com.demo.microservice.consumer.service.feign.IRleFeginService;
import cn.com.demo.microservice.reps.ResponseObject;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class EditRoleFeignServiceFactory implements FallbackFactory<IRleFeginService> {
    @Override
    public IRleFeginService create(Throwable throwable) {
        return new IRleFeginService() {
            @Override
            public ResponseObject deleteRole(int rlId) {
                throwable.printStackTrace();
             return new ResponseObject();
            }
        };
    }
}
